package com.zs.test;

import com.zs.pojo.Person;

/**
 * @author ZhouShuang
 * @version 17
 * @Title
 * @date 2025/6/7 上午10:32
 */
public class AccessPersonConstructors {
    public static void main(String [] args){
        try{
            //加载Person类
            Class<?> clz = Class.forName("com.zs.pojo.Person");
            //调用clz的无参构造方法
            Object object = clz.newInstance();
            System.out.println(object);
        }catch(ClassNotFoundException | InstantiationException | IllegalAccessException e){
            e.printStackTrace();
        }
    }
}
